package cn.iocoder.yudao.module.jikong.dal.mysql.resource;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.jikong.dal.dataobject.resource.JkResourceDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.jikong.controller.admin.resource.vo.*;

/**
 * 样本来源 Mapper
 *
 * @author admin
 */
@Mapper
public interface JkResourceMapper extends BaseMapperX<JkResourceDO> {

    default PageResult<JkResourceDO> selectPage(JkResourcePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<JkResourceDO>()
                .likeIfPresent(JkResourceDO::getName, reqVO.getName())
                .betweenIfPresent(JkResourceDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(JkResourceDO::getId));
    }

}